# Created by: Olivier Duchateau
# $FreeBSD$
#

PORTNAME=	pragha
PORTVERSION=	1.1.2
CATEGORIES=	audio
MASTER_SITES=	GOOGLE_CODE
PROJECTHOST=	dissonance

MAINTAINER=	olivierd@FreeBSD.org
COMMENT=	Lightweight music player

LIB_DEPENDS=	sqlite3:${PORTSDIR}/databases/sqlite3 \
	notify:${PORTSDIR}/devel/libnotify \
	dbus-glib-1:${PORTSDIR}/devel/dbus-glib \
	cddb:${PORTSDIR}/audio/libcddb \
	cdio:${PORTSDIR}/sysutils/libcdio

USE_BZIP2=	yes
GNU_CONFIGURE=	yes
USE_GMAKE=	yes
USE_PKGCONFIG=	build
USE_GETTEXT=	yes
USE_GNOME=	gnomehack gtk20 glib20 intltool intlhack desktopfileutils
INSTALLS_ICONS=	yes

CONFIGURE_ARGS=--disable-totem-plparser \
	--disable-libglyr \
	--disable-libclastfm \
	--with-gstreamer=0.10

OPTIONS_DEFINE=	TAGLIB GST KEYBIND XFCE
OPTIONS_DEFAULT=	GST TAGLIB KEYBIND

KEYBIND_DESC=	Multimedia keyboard shortcuts
GST_DESC=	GStreamer support
TAGLIB_DESC=	ID3 / Ogg tags support
XFCE_DESC=	Xfce integration 

MAN1=	pragha.1

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MTAGLIB}
LIB_DEPENDS+=	tag:${PORTSDIR}/audio/taglib
CONFIGURE_ARGS+=--enable-taglib
.else
CONFIGURE_ARGS+=--disable-taglib
.endif

.if ${PORT_OPTIONS:MGST}
USE_GSTREAMER=	yes
CONFIGURE_ARGS+=--enable-gstreamer-interfaces \
	--enable-gstreamer-audio
.else
CONFIGURE_ARGS+=--disable-gstreamer-interfaces \
	--disable-gstreamer-audio
.endif

.if ${PORT_OPTIONS:MKEYBIND}
LIB_DEPENDS+=	keybinder:${PORTSDIR}/x11/keybinder
CONFIGURE_ARGS+=--enable-keybinder
.else
CONFIGURE_ARGS+=--disable-keybinder
.endif

.if ${PORT_OPTIONS:MXFCE}
USE_XFCE=	libmenu
CONFIGURE_ARGS+=--enable-libxfce4ui
.else
CONFIGURE_ARGS+=--disable-libxfce4ui
.endif

post-install:
	@-update-desktop-database

.include <bsd.port.mk>
